Public Const PC_EXPLICIT = &H2 ' Match to system palette index.
Public Const PC_NOCOLLAPSE = &H4 ' Do not match color existing entries.
' GetDeviceCaps constants.
Global Const RASTERCAPS = 38 ' Raster device capabilities.
Global Const RC_PALETTE = &H100 ' Has palettes.
Global Const NUMRESERVED = 106 ' # reserved entries in palette.
Global Const SIZEPALETTE = 104 ' Size of system palette.
#If Win32 Then ' 32-bit VB.
Declare Function GetDeviceCaps Lib "GDI32" (ByVal hdc As Integer, ByVal nIndex As Integer) As Integer
Declare Function ResizePalette Lib "GDI32" (ByVal hPalette As Integer, ByVal nNumEntries As Integer) As Integer
Declare Function SetPaletteEntries Lib "GDI32" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function GetPaletteEntries Lib "GDI32" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function GetSystemPaletteEntries Lib "GDI32" (ByVal hdc As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function RealizePalette Lib "GDI32" (ByVal hdc As Long) As Long
#Else ' 16-bit VB.
Declare Function GetDeviceCaps Lib "GDI" (ByVal hdc As Integer, ByVal nIndex As Integer) As Integer
Declare Function ResizePalette Lib "GDI" (ByVal hPalette As Integer, ByVal nNumEntries As Integer) As Integer
Declare Function SetPaletteEntries Lib "GDI" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function GetPaletteEntries Lib "GDI" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function GetSystemPaletteEntries Lib "GDI" (ByVal hdc As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
Declare Function RealizePalette Lib "User" (ByVal hdc As Integer) As Integer